package com.elitel.frame.business.service;

import java.util.List;
import java.util.Map;

import com.elitel.frame.main.entity.BaseQueryfield;
import com.elitel.frame.main.entity.BaseQuerysql;
import com.elitel.frame.main.entity.BaseTreeconfig;
import com.elitel.frame.main.entity.CfgDb;
import com.elitel.frame.main.entity.CfgExttree;
import com.elitel.frame.main.entity.CfgField;
import com.elitel.frame.main.entity.CfgTable;
import com.elitel.frame.main.entity.SysPrjservice;
import com.elitel.frame.main.entity.ext.BaseTree;
import com.elitel.frame.main.entity.ext.Census;
import com.elitel.frame.main.entity.ext.CfgTreeExt;
import com.elitel.frame.main.entity.ext.ExtBaseTreeconfig;
import com.elitel.frame.main.entity.vo.PageResponseVo;

public interface TreeConfigService {
	//添加节点
	String insertTreeNode(BaseTreeconfig baseTree);

	String updateTreeNode(BaseTreeconfig baseTreeconfig);

	
	//添加资源树
	String insertTreeList(CfgExttree cfgTreeExt);

	String deleteTreeList(String guid);
	//修改资源树
	String updateTreeList(CfgExttree cfgTreeExt);

	List<Census> getTreeList();

	List<BaseTreeconfig> selectTreeNode(String treeid, String sguid);
	//通过guid获取树节点服务的详情
	CfgExttree selectTreeFile(String guid);
	//根据guid查看是否重复
	int selectCountGUID(String guid);
	
	List<ExtBaseTreeconfig> selectTreeShow(String guid, String treeid);

	BaseTreeconfig selectOneTree(String guid);

	String deleteTreeNode(String guid, String treeid, String seid);
	//根据guid获取cfgexttree对象
	CfgExttree getOneCfgExttree(String guid);

	BaseTreeconfig selectTreeConfig(String guid, String grade);
	//根据表id获取表名
	CfgTable selectTableName(String dtConfigId);
	//获取数据源信息
	CfgDb selectCfgDb(String dtDbKey);
	
	List<BaseTreeconfig> selectTreeConfigList(String guid);

	PageResponseVo<BaseTreeconfig> selectTreeConfigAll(String serviceid);
	// 根据key获取cfg_filed

	CfgField getAllListCfgField(String configid, String dbKey);
	//获取所有的cfgdb集合

	List<CfgDb> selectCfgDbList();
	//获取所有的cfgtable集合
	List<CfgTable> selectCfgTableAll();
	//获取所有的cfgexttree集合
	List<CfgExttree> setTreeing();

	String selectTableCN(String dtConfigId);
	//獲取所有的樹集合
	List<CfgExttree> getTreeListaLL();

	String deleteTreeConfig(String guid);
	//根据表id获取字段map
	Map<String, Object> selectColumnMap(String dbid);

	List<Map<String, Object>> executequerySql(String sqlString);
	//根据guid和层级获取树配置类
	BaseTreeconfig selectTreeConfigOne(String guid, String grade);
	//获取base_querysql
	BaseQuerysql selectConQuery(String serviceID, String grade);
	
	//获取数据库类型
	String getDBType(String serviceID);

	List<BaseQueryfield> selectTreeColumn(String guid);
	
	/**
	 * <pre>deletetreeconfigServerByPrjservice(根据服务中间表删除服务)   
	 * @author：FanWenquan    
	 * @date：2017年12月7日 上午11:41:31   
	 * @param prjservice</pre>
	 */
	void deletetreeconfigServerByPrjservice(SysPrjservice prjservice);
	/**
	 * 代码变更，控制层不添加逻辑判断
	 * @param guid
	 * @param conquery
	 * @return
	 */
	Object selectTreeConfigFile(CfgDb cfgDb, String guid, String conquery);
	
	/**
	 * 代码变更，控制层不添加逻辑判断
	 * @param id
	 * @param serviceID
	 * @param grade
	 * @param conquery
	 * @return
	 */
	Object getPartTreeConfig(CfgDb cfgDb, String id, String serviceID, String grade, String conquery);

	
	
	
}
